From: Cosimo Cecchi Date: Mon, 8 Sep 2014 22:17:24 +0000 (-0700) Subject: rfkill: hide Airplane Mode indicator when g-s-d says so X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~1990 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=084f7a36b12ad68e9d7ff3c48ec4900d8bf6d3a8;p=gnome-shell.git rfkill: hide Airplane Mode indicator when g-s-d says so https://bugzilla.gnome.org/show_bug.cgi?id=736292 --- diff --git a/js/ui/status/rfkill.js b/js/ui/status/rfkill.js index 545ce7c08..e2a57208e 100644 --- a/js/ui/status/rfkill.js +++ b/js/ui/status/rfkill.js @@ -15,6 +15,7 @@ const RfkillManagerInterface = ' \ \ \ \ + \ \ '; @@ -48,6 +49,10 @@ const RfkillManager = new Lang.Class({ return this._proxy.HardwareAirplaneMode; }, + get shouldShowAirplaneMode() { + return this._proxy.ShouldShowAirplaneMode; + }, + _changed: function() { this.emit('airplane-mode-changed'); } @@ -101,9 +106,10 @@ const Indicator = new Lang.Class({ _sync: function() { let airplaneMode = this._manager.airplaneMode; let hwAirplaneMode = this._manager.hwAirplaneMode; + let showAirplaneMode = this._manager.shouldShowAirplaneMode; - this._indicator.visible = airplaneMode; - this._item.actor.visible = airplaneMode; + this._indicator.visible = (airplaneMode && showAirplaneMode); + this._item.actor.visible = (airplaneMode && showAirplaneMode); this._offItem.setSensitive(!hwAirplaneMode); if (hwAirplaneMode)